#include<stdio.h>
int main() {
	int num;
	scanf_s("%d", &num);
	while (num % 2 == 0) {
		scanf_s("%d", &num);
	}
	int row = num - num / 2;
	int col = row;
	int star =1;
	for (int i = 1; i <= row; i++) {
		for (int j = 1; j <= col; j++) {
			printf("#");
		}if (col >= 1)col--;
		for (int j = 1; j <= star; j++) {
			printf("*");
		}if (star <= 2 * row - 1)star += 2;
		printf("\n");
	}int row2 = 2;
	int col2 = 2 * row - 3;
	for (int i = 1; i <=row - 1; i++) {
		for (int j = 1; j <= row2; j++) {
			printf("#");
		}if (row2<= row)row2 += 1;
		for (int j = 1; j <= col2; j++) {
			printf("*");
		}if (col2 >= 1)col2 -= 2;
		printf("\n");
	}
}